package org.sss.interestrates;

import java.util.concurrent.Executors;

import org.sss.interestrates.Interestrates.PushService;

import com.googlecode.protobuf.socketrpc.RpcServer;
import com.googlecode.protobuf.socketrpc.ServerRpcConnectionFactory;
import com.googlecode.protobuf.socketrpc.SocketRpcConnectionFactories;


public class IRServer {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// Start server
		ServerRpcConnectionFactory rpcConnectionFactory = SocketRpcConnectionFactories
		    .createServerRpcConnectionFactory(8090);
		RpcServer server = new RpcServer(rpcConnectionFactory, 
		    Executors.newFixedThreadPool(1), true);
		server.registerService((new PushServiceImpl())); // For non-blocking impl
		//server.registerBlockingService(PushService.newReflectiveBlockingService(new PushBlockingServiceImpl()));
		server.run();
	}
}
